package main.IOStream;

import java.io.File;
import java.io.FileOutputStream;
import java.nio.charset.StandardCharsets;

public class OutPutBytesToFile {
    public static void main(String[] args) {
        File f = new File("data//rrOut.txt");
        try{
            FileOutputStream out = new FileOutputStream(f,false);
            String str = "hahahahha";
            out.write(str.getBytes(StandardCharsets.UTF_8));
            out.flush();
            out.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
